﻿<%@ Page Title="Nuevo" Language="C#" AutoEventWireup="true" CodeFile="Nuevo.aspx.cs" Inherits="_Default"  MasterPageFile="~/Site.Master"%>


<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    

    <section id="createForm">
        <h2>Crear nuevo usuario</h2>
        <br />
              <asp:Label ID="Label1" runat="server">Nombre:</asp:Label>
        <asp:TextBox ID="nombre" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="nombre" CssClass="field-validation-error" ErrorMessage="El usuario es requerido." />
        </br>
        <asp:Label runat="server">Contraseña:</asp:Label>
        <asp:TextBox ID="contrasena" runat ="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="contrasena" CssClass="field-validation-error" ErrorMessage="La contrasena es requerida." />
        </br>
        <asp:Label ID="Label5" runat="server">Email:</asp:Label>
        <asp:TextBox ID="email" runat ="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="email"
        ErrorMessage="No es un email valido" SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
        ValidationGroup="CreateUserWizard1"></asp:RegularExpressionValidator>&nbsp;

        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="email" CssClass="field-validation-error" ErrorMessage="El email es requerido." />
        </br>
        <asp:Label ID="Label6" runat="server">Rol:</asp:Label>
            
        <asp:DropDownList id ="divRol" AutoPostBack ="true" runat="server" Width="150px" OnSelectedIndexChanged="divRol_SelectedIndexChanged"> 
            <asp:ListItem>Asignado</asp:ListItem>
            <asp:ListItem>Usuario normal</asp:ListItem>
            <asp:ListItem>Director</asp:ListItem>
            <asp:ListItem>Administrador</asp:ListItem>

            </asp:DropDownList>
        <asp:Panel ID="departamento" runat="server" Visible ="false">
            Seleccione departamento:
            <asp:DropDownList ID="departamentos" AutoPostBack ="true" runat="server" OnSelectedIndexChanged="departamentos_SelectedIndexChanged"></asp:DropDownList>
            <asp:Panel ID="nD" runat="server" Visible ="false">Nombre:
            <asp:TextBox ID ="nDepartamento" runat="server"></asp:TextBox>
                </asp:Panel>
        </asp:Panel>
        
        </br>
            

            <asp:Button ID="Button1" runat="server" CommandName="Servicio" Text="Crear" OnClick ="enviar"/>
            
         
              </section>
        
</asp:Content>
